This invention relates to detecting the usage of a particular audio stream. It is especially useful for detecting whether a device is tuned to a particular radio channel. In a preferred embodiment of the invention that knowledge could be used to trigger whether a hands-free cellular telephone transceiver forwards audio data through that channel and/or switches on its own loudspeaker. This may allow audio data to be presented to the user but avoid presenting audio data through duplicated channels.
FIG. 1 shows the architecture of a device that includes a cellular telephone transceiver and that is installed in a vehicle. The device could be a car kit accessory or could be integrated with the car or its hi-fi system. The device 1 is installed in a vehicle 2 which also has an in-car audio system. The audio system includes a head unit 3 which can receive or generate audio from various sources. In this example the head unit includes an FM radio receiver 4 for receiving FM radio signals and a CD player 5 for playing CDs. The audio system also has loudspeakers 6 through which it can play out audio from the sources. The car kit includes a two-way audio interface 7 (e.g. a cellular telephone transceiver), an FM radio transmitter 8, a loudspeaker 9, a one-way audio interface 10 and a manual switch 11. The one-way interface could, for example, be a Bluetooth receiver for receiving audio from a nearby Bluetooth device such as a cellular phone, or it could be an FM receiver for receiving FM signals. The car kit can take audio input either from radio channels received by radio receiver 10 or from audio received in a phone call by two-way interface 7. Switching between these will typically happen automatically depending on whether a phone call is in progress. Devices 7 and 10 could be integrated together.
The car kit can provide audio output either through loudspeaker 9 or (via FM transmitter 8 and FM receiver 4) through the loudspeakers 6 of the in-car audio system. Switching between these is dependent on the state of manually operable switch 11. Thus, in one of the car kit's output modes the audio input devices 7 and 10 are connected by switch 11 to the loudspeaker 9 of the car kit so that received audio is played out through the loudspeaker 9 of the car kit. In the other of the car kit's output modes the audio input devices 7 and 10 are connected by switch 11 to the FM transmitter 8 so that it can be received by the FM receiver 4 and then played out by the audio system over loudspeakers 6. The second mode is convenient because the loudspeakers 6 of the audio system typically provide better performance than the loudspeaker 9 of the car kit, and there is no need for the user to separately mute the audio system in order to listen to the call. However, the second mode will only work if the audio system is using its FM receiver 4 as input and if that FM receiver 4 is tuned to the same channel as the FM transmitter 8 is configured to transmit on. Since the car kit 1 does not know whether that is the case, the switch 11 allows the user to manually configure which of the two modes the car kit is to operate in.
The fact that the user has to manually configure the car kit to select an input mode is inconvenient for the user, especially since he might prefer to alter such a configuration whilst driving the vehicle. The switch adds to the cost of the car kit. Using loudspeaker 9 unnecessarily might drain the energy of the car kit, which is especially relevant if it is battery-powered. Therefore, it would be advantageous if the car kit could automatically determine which mode to operate in.
A microphone 12 may provide input to a digital signal processor 13 for performing echo cancellation when a user is engaged in a phone call. This operation will be described with reference to FIG. 2.
FIG. 2 illustrates the acoustic environment inside a vehicle such as the vehicle of FIG. 1. In this environment a receive-in signal x(n) is sent to a loudspeaker 20 (which could be one of loudspeakers 6 or 9) inside the body 21 of the vehicle. This signal propagates within the interior of the vehicle through an acoustic path q(n) and feeds back into a microphone 22 (which could be microphone 12) to generate an echo signal c(n). c(n)=q(n)*x(n), where ‘*’ represents the convolution operation. The total input d(n) to the microphone will include the echo signal c(n) and also an external input signal s(n) which represents audio generated from other sources such as speech within the vehicle or engine noise.
An acoustic echo cancellation (AEC) system can be used to cancel the echo signal c(n) from the microphone signal d(n) in order to obtain an estimate of the external signal s(n). This operation may, for example, be done to identify the signal s(n) as a near-end speech signal for transmitting to the remote party on a phone call. Separating signal c(n) from signal s(n) is known as the AEC problem. The objective of a system that is to solve the AEC problem is to simulate the acoustic echo path q(n) and then subtract the simulated path response y(n) from the microphone signal d(n) to yield a signal e(n) that is an estimate of the signal s(n). The path response can be simulated using an adaptive filter g(n) which takes the signal x(n) that is input to the loudspeaker as input and yields a response y(n). It can be seen that if the adaptive filter correctly simulates the acoustic path (i.e. if g(n)=q(n)) then y(n)=c(n), and subtracting the output signal of the adaptive filter y(n) from the microphone signal d(n) will fully cancel the echo signal c(n). In practice the characteristics of q(n) are not known so typically the response of the filter g(n) is adapted (e.g. based on e(n)) with the aim of best simulating q(n). Algorithms for adapting the filter response to best simulate q(n) are well-known: see, for example: R. G. Alves and K. Yen, “Method and System for Clear Signal Capture,” U.S. Pub. No. 2006/0034447, Feb. 16, 2006, incorporated herein by reference in its entirety; B. Widrow and S. D. Sterns, “Adaptive Signal Processing,” Prentice-Hall, 1985; S. Haykin, “Adaptive Filter Theory,” Prentice-Hall, 2002.